<template>
  <div>
    <div v-loading="loading">
      <dk-form ref="editForm" :form-data="formData" @submit="onSubmit" />
    </div>
  </div>
</template>

<script>
import { getPlaid } from '@/utils/auth'
import { getWorkWechatEditForm } from '@/api/platform/work_wechat'

export default {
  name: 'WechatSystem',
  data() {
    return {
      formData: null,
      plaid: 0,
      loading: true
    }
  },
  mounted() {
    this.plaid = getPlaid()
    this.getWechatEditForm()
  },
  methods: {
    onSubmit(data, res) {
      console.log(data, res)
    },
    getWechatEditForm() {
      getWorkWechatEditForm(this.plaid).then((res) => {
        this.formData = res.data
        this.loading = false
      })
    }
  }
}
</script>
<style scoped lang="scss">
.app-container {
  min-height: 600px;
}
</style>
